@ECHO OFF&(PUSHD "%~DP0")&(REG QUERY "HKU\S-1-5-19">NUL 2>&1)||(
powershell -Command "Start-Process '%~sdpnx0' -Verb RunAs"&&EXIT)
:: 注册信息
reg add "HKCU\SOFTWARE\ES-Computing\EditPlus\Install" /f /v "License" /t REG_BINARY /d "db892918015e0c5e789ce374ccc951082d4e2d2a963573b37474d23575723534d0b5b48c3272d435750e3773d135700e31360500dbb00a32" >NUL 2>NUL
reg add "HKCU\SOFTWARE\ES-Computing\EditPlus\Install" /f /v "License 5" /t REG_BINARY /d "db892918215e1e5e789c630d63c86728634864c8639035607064706730613063d065f0024213060b065720db19483a024967201b246206c4e140b62b5024142813cec0c000006e00095b" >NUL 2>NUL
reg add "HKCU\SOFTWARE\ES-Computing\EditPlus\Install" /f /v "License 4" /t REG_BINARY /d "db892918215e1d5e789c1589bb11803014c3d4304646a078f9c1006405fa2c103ae6479ccf3e9dbcdd3cbc4c1629a81c04999dd304852e37b7ba4dfe4db643ee9acb67001f4cae0831" >NUL 2>NUL
:Menu
Echo.&Echo  已添加激活信息到注册表完成激活！
Echo.&Echo  1、添加右键使用 EditPlus 打开项
Echo.&Echo  2、删除右键使用 EditPlus 打开项
ECHO:
set /p choice=输入数字敲回车键：
if not "%choice%"=="" set choice=%choice:~0,1%
if /i "%choice%"=="1" Goto AddMenu
if /i "%choice%"=="2" Goto RemoveMenu
ECHO 输入无效 &PAUSE>NUL&CLS&GOTO MENU
:AddMenu
reg add "HKCR\*\shell\EditPlus" /f /ve /d "用 EditPlus 打开"  >NUL 2>NUL
reg add "HKCR\*\shell\EditPlus" /f /v "Icon" /t REG_EXPAND_SZ /d "%~dp0editplus.exe" >NUL 2>NUL
reg add "HKCR\*\shell\EditPlus\command" /f /ve /d "%~dp0editplus.exe \"%%1\"" >NUL 2>NUL
ECHO:&ECHO 完成 &PAUSE>NUL&CLS&GOTO MENU
:RemoveMenu
regsvr32 /s /u eppshell64.dll
reg delete "HKCR\*\shell\EditPlus" /f >NUL 2>NUL
reg delete "HKCR\*\shell\EditPlus" /f >NUL 2>NUL
::reg delete "HKCU\SOFTWARE\ES-Computing" /f >NUL 2>NUL
::reg delete "HKLM\SOFTWARE\ES-Computing" /f >NUL 2>NUL
ECHO:&ECHO 完成 &PAUSE>NUL&CLS&GOTO MENU